﻿using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Web;
using System.Web.Mvc;

namespace Model
{

    [MetadataType(typeof(M_ReceiveForm_Metadata))]
    [DisplayName("M_ReceiveForm")]
    public partial class M_ReceiveForm
    {
        public M_ReceiveForm()
        {
            this.Id = Guid.NewGuid();
            this.DateTime = DateTime.Now;
            this.UserId = new Guid(HttpContext.Current.User.Identity.Name);
            
        }

        public class M_ReceiveForm_Metadata
        {
            [ScaffoldColumn(false)]
            public Guid Id { get; set; }

            [ScaffoldColumn(false)]
            public Guid ItemId { get; set; }

            [DisplayName("收款期次编号")]
            [Required(ErrorMessage = "期次编号不能为空")]
            public object Number { get; set; }

            [DisplayName("实收金额")]
            public object ReceivedMoney { get; set; }

           // [DisplayName("是否开发票")]
            //[DisplayFormat(ConvertEmptyStringToNull = false)]
          //  public object IsForm { get; set; }

          
            [DisplayName("收款时间")]
            [DataType(DataType.DateTime)]
            public object DateTime { get; set; }

            [DisplayName("备注")]
            [DisplayFormat(ConvertEmptyStringToNull = false)]
            public object Description { get; set; }

            [ScaffoldColumn(false)]
            public System.Guid UserId { get; set; }

            //[DisplayName("标题")]
            //[Required]
            //public object Title { get; set; }



        }
    }
}
